package com.unhz.taigu.service;

import com.unhz.generator.pojo.DeliveryOrder;
import com.unhz.generator.utils.Page;
import com.unhz.generator.vo.DeliveryOrderVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @Author: 王林恩
 * @Description:交货订单
 * @Date: Created in 上午 9:00 2018/2/1 0001
 * @Modified By:
 */
public interface DeliveryOrderService {

    /**
     * Id查询交货订单
     * @param id 交货订单Id
     * @return
     */
    DeliveryOrder findDeliveryOrder(Long id);

    /**
     * 模糊查询交货订单，列表展示
     * @param keywords
     * @return
     */
    Page<DeliveryOrderVo> findAllDeliveryOrder(String pageNo, Integer pageSize, String keywords,Integer adminId,Integer roleId);

    /**
     * 模糊查询交货订单总数
     * @param keywords
     * @return
     */
    int findCountDeliveryOrder(String keywords);

    /**
     * 添加交货订单
     * @param deliveryOrder 交货订单
     * @return
     */
    //int addDeliveryOrder(DeliveryOrder deliveryOrder,List list);
    int addDeliveryOrder(DeliveryOrder deliveryOrder,String [] size,String [] number);

    /**
     * 删除交货订单
     * @param id 交货订单id
     * @return
     */
    int  deleteDeliveryOrderById(Long id);

    /**
     * 修改交货订单
     * @param deliveryOrder 交货订单
     * @return
     */
    int updateDeliveryOrder(DeliveryOrder deliveryOrder);


    DeliveryOrder findBy(String deliveryNo,String productionId);

    void updateDeliveryOrderStatus(Integer deliveryId, int status);

    List<DeliveryOrder> findByProductionId(String productionId);

    /**
     * 逻辑删除交货订单
     * @param deliveryId
     * @return
     */
    int deleteDeliveryOrder(Long deliveryId);

    /**
     * 根据排产订单id查询交货订单
     * @param productionId
     * @return
     */
    List<DeliveryOrder> selectDeliveryOrder(Long productionId);

    /**
     * 根据排产订单id查询最新的交货订单
     * @param productionId
     * @return
     */
    DeliveryOrder selectNewDeliveryOrder(Long productionId);

    /**
     * 添加交货订单
     * @param deliveryOrder
     * @return
     */
    int insertDeliveryOrder(DeliveryOrder deliveryOrder);
}
